﻿using System;
using System.ComponentModel.DataAnnotations;
using Util;
using Util.Domains.Repositories;

namespace IterationLife.FootballTeaching.Queries {
    /// <summary>
    /// 球员位置查询实体
    /// </summary>
    public class PlayerPositionQuery : QueryEntityBase {
        /// <summary>
        /// 球员位置编号
        /// </summary>
        [Display(Name="球员位置编号")]
        public Guid? PlayerPositionId { get; set; }
        
        private string _name = string.Empty;
        /// <summary>
        /// 名称
        /// </summary>
        [Display(Name="名称")]
        public string Name {
            get { return _name == null ? string.Empty : _name.Trim(); }
            set{ _name=value;}
        }
        
        private string _code = string.Empty;
        /// <summary>
        /// 编码
        /// </summary>
        [Display(Name="编码")]
        public string Code {
            get { return _code == null ? string.Empty : _code.Trim(); }
            set{ _code=value;}
        }
        /// <summary>
        /// 启用
        /// </summary>
        [Display(Name="启用")]
        public bool? Enabled { get; set; }
        /// <summary>
        /// 排序号
        /// </summary>
        [Display(Name="排序号")]
        public int? SortId { get; set; }
        /// <summary>
        /// 起始创建时间
        /// </summary>
        [Display( Name = "起始创建时间" )]
        public DateTime? BeginCreationTime { get; set; }
        /// <summary>
        /// 结束创建时间
        /// </summary>
        [Display( Name = "结束创建时间" )]
        public DateTime? EndCreationTime { get; set; }        
        /// <summary>
        /// 创建人
        /// </summary>
        [Display(Name="创建人")]
        public Guid? CreatorId { get; set; }
        /// <summary>
        /// 起始最后修改时间
        /// </summary>
        [Display( Name = "起始最后修改时间" )]
        public DateTime? BeginLastModificationTime { get; set; }
        /// <summary>
        /// 结束最后修改时间
        /// </summary>
        [Display( Name = "结束最后修改时间" )]
        public DateTime? EndLastModificationTime { get; set; }        
        /// <summary>
        /// 最后修改人
        /// </summary>
        [Display(Name="最后修改人")]
        public Guid? LastModifierId { get; set; }
        
        /// <summary>
        /// 添加描述
        /// </summary>
        protected override void AddDescriptions() {
            base.AddDescriptions();
            AddDescription( "球员位置编号", PlayerPositionId );
            AddDescription( "名称", Name );
            AddDescription( "编码", Code );
            AddDescription( "启用", Enabled.Description() );
            AddDescription( "排序号", SortId );
            AddDescription( "起始创建时间", BeginCreationTime );
            AddDescription( "结束创建时间", EndCreationTime );
            AddDescription( "创建人", CreatorId );
            AddDescription( "起始最后修改时间", BeginLastModificationTime );
            AddDescription( "结束最后修改时间", EndLastModificationTime );
            AddDescription( "最后修改人", LastModifierId );
        }

        private string _excludeIds = string.Empty;
        /// <summary>
        /// 排除编号集合
        /// </summary>
        public string ExcludeIds
        {
            get { return _excludeIds == null ? string.Empty : _excludeIds.Trim(); }
            set { _excludeIds = value; }
        }
    }
}
